Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sqllab] add autocomplete to AceEditor for table and column names #1475

Merged
merged 2 commits into from
Oct 29, 2016

Conversation

mistercrunch
Copy link
Member

setAutoCompleter() {
// Loading table and column names as auto-completable words
const completer = {
getCompletions: (aceEditor, session, pos, prefix, callback) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would pull this out into it's own method on the component, otherwise LGTM

const columns = {};
const tables = this.props.tables || [];
tables.forEach(t => {
words.push({ name: t.name, value: t.name, score: 55, meta: 'table' });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be nice to differentiate tables or views, optional

@bkyryliuk
Copy link
Member

Looks good!

@mistercrunch mistercrunch merged commit 4bf5252 into apache:master Oct 29, 2016
@mistercrunch mistercrunch deleted the autocomplete branch October 29, 2016 04:35
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.13.0 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement auto completion in the SQL Editor
3 participants